package com.ys.web.user.friends.service;


import com.ys.web.user.friends.dto.FriendsRemarkDTO;
import com.ys.web.user.friends.po.BaseUserApplyPO;
import com.ys.web.user.friends.po.BaseUserFriendsPO;
import com.ys.web.user.friends.po.BaseUserWxPO;

import java.util.List;

/**
 * @ClassName FriendsService
 * @Description 好友接口
 * @Author qxj
 * @Date 2021/5/9 9:46
 * @Version 1.0
 */
public interface FriendsService {

    /**
     * @title queryFriendsByPhone
     * @description 通过电话号码获取好友信息
     * @author qxj
     * @updateTime 2021/5/9 10:18
     * @return: java.lang.String
     */
    BaseUserWxPO queryFriendsByPhone(String key);

    /**
     * @param uid      用户id
     * @param friendId 好友id
     * @return
     * @title addFriendsById
     * @description 通过还有id 添加好友
     * @author qxj * @param uid
     * @updateTime 2021/5/9 16:51
     */
    void addFriendsById(String uid, String friendId, int groupId, String remark);

    /***
     * @title delFriendsById
     * @description
     * @author qxj * @param uid
     * @param friendId 好友id
     * @param uid 用户id
     * @updateTime 2021/5/9 16:58
     * @return: java.lang.String
     */
    int delFriendsById(String uid, String friendId);

    /***
     * @title setFriendsRemarkInfo
     * @description
     * @author qxj
     * @param friendsRemarkDTO 好友备注信息DTO
     * @param uid 用户id
     * @updateTime 2021/5/9 17:26
     * @return: int
     */
    int setFriendsRemarkInfo(String uid, FriendsRemarkDTO friendsRemarkDTO);

    /***
     * @title getFriendsDetailByUserId
     * @description
     * @author qxj
     * @param uid 用户id
     * @param userId 好友id
     * @updateTime 2021/5/9 17:47
     * @return: com.ys.web.user.friends.po.BaseUserFriendsPO
     * @throws
     */
    BaseUserFriendsPO getFriendsDetailByUserId(String uid, String userId);

    /**
     * @param uid       用户id
     * @param searchKey 查询关键字
     * @title getFriendsList
     * @description 获取好友列表
     * @author quxinjun
     * @updateTime 2021/5/10 9:35
     * @return: java.util.List<com.ys.web.user.friends.po.BaseUserFriendsPO>
     */
    List<BaseUserFriendsPO> getFriendsList(String uid, String searchKey);

    /**
     * @param uid    用户id
     * @param fromId 发起人id
     * @title agreeApply
     * @description
     * @author qxj
     * @updateTime 2021/5/10 22:10
     * @return: java.lang.String
     */
    int agreeApply(String uid, String fromId);

    /**
     * @param uid 用户id
     * @title getApplyList
     * @description 获取申请列表
     * @author qxj
     * @updateTime 2021/5/10 22:36
     * @return: java.lang.String
     */
    List<BaseUserApplyPO> getApplyList(String uid);

    /**
     * @param uid      uid 操作用户id
     * @param friendId 拉黑的好友id
     */
    void friendBlack(String uid, long friendId, int type);

    /**
     * @param uid      操作用户id
     * @param groupId  群组id
     * @param friendId 好友id
     * @title setDisturb
     * @description 设置消息免打扰
     * @author quxinjun
     * @updateTime 2021/6/9 17:52
     */
    void setDisturb(Long uid, String friendId, String groupId);

    int delApplyById(String uid, String applyId);

    void refreshFriend(String phone);

    void refreshAll();

    boolean groupManager(String uid);

    int userFriendNumber(String uid);

    int userApplyNumber(String uid);

    void copyFriends(String uid, long friendsId);
}
